package com.yc.oop3;

//封装对象
public class Teacher {
	//对象里面的所有的属性,全部私有化
	private String name;
	private double sal;
	
	//视情况,对外提供公开的get/set方法. 教学,教学属性理想状态. 
	//理想状态,是所有的属性全部都有get/set方法
	//alt + shift + s
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public double getSal() {
		return sal;
	}
	public void setSal(double sal) {
		this.sal = sal;
	}
	
	
	//空的构造函数,方便我们直接创建对象不报错
	//带参的构造函数,方便我们创建初始值
	public Teacher() {
		super();
	}
	public Teacher(String name, double sal) {
		super();
		this.name = name;
		this.sal = sal;
	}
}
